Skip to content

test(pm): pin core.quotePath=true in the real-git quoted-path fixtures - #33962

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-wa0uqb
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-wa0uqb

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Fixes #33846
Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:两个受管合并守卫自测里的真实 git 夹具,在 git 命令行上钉住 core.quotePath=true。
  • 为什么改:夹具只剥 GIT_* 环境变量,不挡用户或系统 gitconfig;机器上设了 core.quotePath=false 时,两条 CONTROL 断言会误红(只会红,不会假绿)。
  • 风险与回滚:只动自测夹具,不动守卫判定逻辑,断言数不变(530 / 745);回滚即 revert 本 PR。
  • 先看:scripts/pm/check-governed-queue-guard.mjs 的夹具 g,再看 scripts/pm/check-governed-merges.mjs 的夹具 fg。
  • 两分钟验证:HOME=$(mktemp -d) sh -c 'git config --global core.quotePath false && node scripts/pm/check-governed-merges.mjs --self-test',预期 745 条全绿。
  • 需要你做的:无,席位落地。

What changes

The CONTROL rows of the NUL-path fixtures (from PR #33804) witness that git C-quotes the fixture names when a read runs without -z. Both fixture wrappers run real git under gitFreeEnv(), which strips every GIT_ key but leaves HOME / XDG_CONFIG_HOME and /etc/gitconfig in reach, so a box with core.quotePath=false in any config file spells the non-ASCII names raw and reds the two CONTROL rows.

The fix adds -c core.quotePath=true to the command-line pins each wrapper already carries (user.email, user.name, init.defaultBranch, commit.gpgsign):

  • scripts/pm/check-governed-queue-guard.mjs: the g wrapper of the quoted-path fixture (guard-quoted-paths-).
  • scripts/pm/check-governed-merges.mjs: the fg wrapper of the quoted-path fixture (governed-merges-quoted-paths-).

Why the -c pin rather than GIT_CONFIG_GLOBAL=/dev/null + GIT_CONFIG_NOSYSTEM=1: command-line -c outranks every config file level (system, global, XDG, local), so one pin covers all of them. The env route needs two variables to cover only global and system, and it would have to go through gitFreeEnv(), which strips every GIT_ key by design, so it means changing the shared helper and its callers. The -c pin also sits in the same place as the fixture's existing identity pins. scripts/git-env.mjs is not changed, so no caller of gitFreeEnv() moves.

Forced test edits: none. No assertion, expected value or case count changed. Only the two fixture wrappers' git argument lists and their comments changed.

Tests

The acceptance asked for these runs: each self-test with core.quotePath=false set in a throwaway global config, before and after the fix. gitFreeEnv() strips GIT_CONFIG_GLOBAL, so the throwaway config goes in through HOME, plus one XDG_CONFIG_HOME run.

run queue-guard --self-test governed-merges --self-test
base 895783a, default config exit 0, 530 cases exit 0, 745 assertions
base 895783a, HOME with core.quotePath=false (ablation) exit 1, 1 of 530 failed: the CONTROL row exit 1, 1 failure: the #33620 CONTROL row
head cd7b9ac, HOME with core.quotePath=false exit 0, 530 cases exit 0, 745 assertions
head cd7b9ac, XDG_CONFIG_HOME with core.quotePath=false exit 0, 530 cases exit 0, 745 assertions
head cd7b9ac, default config exit 0, 530 cases exit 0, 745 assertions
Ablation output at base (core.quotePath=false)
check-governed-queue-guard:
  ✗ ⛔ CONTROL the-fixture-names-are-ones-git-C-quotes-without--z: ["\"skills/a/two\\nlines.md\"","skills/a/文档.md"]
✗ check-governed-queue-guard self-test: 1 of 530 case(s) failed.

check-governed-merges:
✗ check-governed-merges --self-test — 1 failure(s)
  • ⛔ #33620 CONTROL the-fixture-names-are-ones-git-C-quotes-without--z: [".github/workflows/café.yml","\"skills/a/two\\nlines.md\"","skills/a/文档.md"]

The newline name stays quoted under core.quotePath=false. Only the non-ASCII names lose their quotes, which is the every(startsWith('"')) limb the CONTROL row reads.

Acceptance notes

  • The card's mechanism assumptions held: no core.quotePath pin existed in either fixture at 895783a, and gitFreeEnv() does not cover config files. One small correction: at base, neither file's comment named core.quotePath. The governed-merges comment said only "git would C-quote". Both comments now name it.
  • The lowrisk-rename- real-git fixture in check-governed-queue-guard is in the low-risk arm region (another card is working there) and was left alone. It uses only ASCII names, so it does not depend on core.quotePath.
  • A system-level /etc/gitconfig leg was not run, because it would mean writing a file outside the workspace. -c outranks the system level by git's documented precedence.

Verification

Gates: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack on head cd7b9ac derived 35 commands. All 35 exited 0. --ran reconciliation: "35 derived famil(ies) accounted for — 35 run, 0 NOT-MEASURED (a DERIVED zero — all 35 recorded an exit code and none of them is 3)". CI runs every other family on this PR.

Derived gate list, each exit 0 at cd7b9ac
node scripts/check-closing-keyword-parity.mjs (+ --self-test)
node scripts/check-comment-mask-corpus.mjs
node scripts/check-declaration-mirrors.mjs (+ --self-test)
node scripts/check-self-test-wired.mjs (+ --self-test)
node scripts/check-self-test-workflow-commands.mjs (+ --self-test)
node scripts/check-skills-token-ratchet.mjs (+ --self-test)
node scripts/check-whole-set-label-write.mjs (+ --self-test)
node scripts/ci/plan-test-core-shards.mjs --self-test
node scripts/pm/bare-root-worklist.mjs --self-test
node scripts/pm/check-governed-queue-guard.mjs --self-test
pnpm check:agent-test-spelling · check:bash32-floor · check:ci-filter-parity · check:cli-command-ids
pnpm check:closing-target-claim · check:cross-package-test-inputs · check:driver-memory-census · check:entry-guard
pnpm check:gitlink-declared · check:nul-bytes · check:parse-guard · check:pm-dispatch-gates
pnpm check:pm-governed-merges · check:pnpm-filter-targets · check:pnpm-flag-spellings · check:ratchet-remedy-authority
pnpm check:refd-timer-probe · check:scripts-symbol-anchors · check:watch-hint-literal

This PR changes only scripts/pm/** and publishes nothing, so it takes skip-changeset. No governed surface is touched.


Generated by Claude Code

The CONTROL rows of the NUL-path fixtures in check-governed-queue-guard
and check-governed-merges witness that git C-quotes the fixture names
without -z. gitFreeEnv strips GIT_* but not a user or system gitconfig,
so a box with core.quotePath=false spelled the non-ASCII name raw and
reddened both CONTROL rows. Pin the setting on the fixture's own git
command line, beside the identity pins it already carries; -c outranks
every config file level.

Claude-Session: https://claude.ai/code/session_01ADHkmSDNFF5uczb7BL5Bdf
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-steve · session_01ADHkmPd7uRqHauEehGPr19

席位核对 · ACCEPT · head cd7b9ac5e170acf26ee63382a6a43ff94a11cefc · 2026-11-15T15:03Z

  • 形态: 2 files, scripts/pm/check-governed-queue-guard.mjs and scripts/pm/check-governed-merges.mjs, self-test fixture wrappers only (+7 / −3). Not governed; no contract face (Clause-②: no): seat read plus CI.
  • 前提实测: origin/main 895783a: both real-git fixture wrappers (g ~L3690, fg ~L8688) pinned identity and signing but not core.quotePath, so a box with core.quotePath=false in a user gitconfig reds the CONTROL witness.
  • 读 diff: -c core.quotePath=true added beside the existing pins in both wrappers; a command-line -c outranks every config level, and gitFreeEnv() (which strips GIT_*, so an env-var route would not pass) is untouched, so no other caller moves. The code under test reads with -z and is indifferent to the setting. Comments state why.
  • 门禁: the dev ran 35/35 derived families (exit 0); ablation shown: base with core.quotePath=false in HOME/.gitconfig exits 1 on both self-tests, at exactly the CONTROL row; head exits 0 under HOME, XDG_CONFIG_HOME and default config. Check-runs on this head: none red at this read, several in progress; auto-merge lands only on green.
  • 接受的偏差: Fixes #33846 sits on body line 3, under the two required attribution lines. The /etc/gitconfig leg is not measured; -c outranks system config by git's own precedence.
  • 范围外去向: none. pm: the carried-record regeneration test lists a renamed path by its destination only, so a hop that moves a reviewed file out of its face is not seen #33578 item 3 builds on this choice (helper unchanged).
  • 落地: K = 0. Ready + auto-merge by this seat.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 15, 2026 15:05
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit aec637b Nov 15, 2026
50 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-wa0uqb branch November 15, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

review follow-ups of PR #33804

2 participants